package linkedlist.iterator;

import linkedlist.Node;

/**
 * @Author wangtengyu
 * @Create 2018-09-03-9:26 循环遍历链表
 */
public class LoopIterator {

  public void iterator(Node node) {

    while (node != null) {
      System.out.print(node.getData() + " ");
      node = node.getNext();
    }
  }

}
